package core;

import java.util.concurrent.*;

/**
 * faz o start do programa
 * @author jjeske
 *
 */
public class ReleasePhilosophers {
	
	public static void main(String[] args){
		Semaphore garfos[] = new Semaphore[5];
		
		Thread[] filosofos = new Thread[5];
		
		for(int i=0;i<5;i++){
			garfos[i] = new Semaphore(1);
		}
		
		for(int i=0;i<5;i++){
			filosofos[i] = new Thread(new Philosoper(garfos, i));
		}
		
		for(int i=0;i<5;i++){
			filosofos[i].start();
		}
		
		
	}

}
